package cn.smbms.dao.user;

import cn.smbms.beans.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ Author   ：陈慧杰
 * @ Date     ：Created in 15:55 2021/12/2
 */
@Repository("userDao")
public interface UserDao {
    public User login(@Param("userName") String userName, @Param("password") String password);

    public List<User> getUserList(@Param("user") User user ,@Param("queryname") String queryname,@Param("queryUserRole") String queryUserRole
    ,@Param("fromIndex") Integer fromIndex ,@Param("pageSize") Integer pageSize) ;


    int getUserCount(@Param("queryname") String queryname,@Param("queryUserRole") String queryUserRole);

    int addUser(User user);

    User ucExist(@Param("userCode") String userCode);

    int deleteUser(@Param("uid") String uid);


    User userView(@Param("uid") String uid);

    int doUserModify(User user);

    boolean updatePwd(User user);



    String yanPwd(@Param("id") Integer id);

    int getPwdByUserId(@Param("newpassword") String newpassword , @Param("id") Integer id);
}
